import request from '@/utils/request'

// 查询财物分类列表
export function listClassify(query) {
  return request({
    url: '/oms/classify/list',
    method: 'get',
    params: query
  })
}

// 查询部门列表（排除节点）
export function listClassifyExcludeChild(classifyId) {
  return request({
    url: '/oms/classify/list/exclude/' + classifyId,
    method: 'get'
  })
}

export function treeselect() {
  return request({
    url: '/oms/classify/treeselect',
    method: 'get'
  })
}

export function classifyTreeselect() {
  return request({
    url: '/oms/classify/treeselect',
    method: 'get'
  })
}


// 初始化
export function initBean() {
    return request({
        url: '/oms/classify/initBean',
        method: 'post'
    })
}

// 查询财物分类详细
export function getClassify(id) {
  return request({
    url: '/oms/classify/' + id,
    method: 'get'
  })
}

// 新增财物分类
export function addClassify(data) {
  return request({
    url: '/oms/classify',
    method: 'post',
    data: data
  })
}

// 修改财物分类
export function updateClassify(data) {
  return request({
    url: '/oms/classify',
    method: 'put',
    data: data
  })
}

// 删除财物分类
export function delClassify(id) {
  return request({
    url: '/oms/classify/' + id,
    method: 'delete'
  })
}
